<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${salesCoupon.id}"  type="hidden">

							<div class="form-group">
								<label class="col-sm-3 control-label">选择大礼包：</label>
								<div class="col-sm-8">
									<select data-placeholder="--选择大礼包--" name="bagsId" id="bagsId"
											class="form-control chosen-select" tabindex="2" >
										<option value="">--选择大礼包--</option>
										 <option th:each="bag : ${bags}" th:value="${bag.id}" th:text="${bag.name}" th:if="${salesCoupon.bagsId ==bag.id}" th:selected="selected"></option>
									</select>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">选择商品：</label>
								<div class="col-sm-8">
									<select data-placeholder="--选择商品--" name="goodsId" id="goodsId"
											class="form-control chosen-select1" tabindex="2" >
										<option value="">--选择商品--</option>
										<option th:each="goods : ${goodsList}" th:value="${goods.id}" th:text="${goods.name}" th:if="${salesCoupon.goodsId ==goods.id}" th:selected="selected"></option>
									</select>
								</div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">优惠券名称：</label>
								<div class="col-sm-8">
									<input id="name" name="name" th:value="${salesCoupon.name}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">优惠金额：</label>
								<div class="col-sm-8">
									<input id="money" name="money" th:value="${salesCoupon.money}" class="form-control" type="text" required onkeyup=checkNum(this)>
								</div>
							</div>
							
							<div class="form-group">
								<label class="col-sm-3 control-label">优惠券类型：</label>
								<div class="col-sm-8">
									<label class="radio-inline"> <input
											th:field="*{salesCoupon.type}" type="radio" name="type" value="1" />
										新人
									</label> <label class="radio-inline"> <input
										th:field="*{salesCoupon.type}" type="radio" name="type" value="0" />
									默认
								</label>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">满减满足金额：</label>
								<div class="col-sm-8">
									<input id="enoughMoney" name="enoughMoney" th:value="${salesCoupon.enoughMoney}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">总数量：</label>
								<div class="col-sm-8">
									<input id="totalNum" name="totalNum" th:value="${salesCoupon.totalNum}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">已发数量：</label>
								<div class="col-sm-8">
									<input id="sendNum" name="sendNum" th:value="${salesCoupon.sendNum}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">使用期限起：</label>
								<div class="col-sm-8">
									<input id="limitSartat" name="limitSartat" th:value="${#dates.format(salesCoupon.limitSartat, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">使用期限至：</label>
								<div class="col-sm-8">
									<input id="limitEndat" name="limitEndat" th:value="${#dates.format(salesCoupon.limitEndat, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">允许单人领取数量：</label>
								<div class="col-sm-8">
									<input id="limitNumber" name="limitNumber" th:value="${salesCoupon.limitNumber}" class="form-control" type="text">
								</div>
							</div>
														<!--<div class="form-group">
								<label class="col-sm-3 control-label">允许余额购买（0：能买，1：不能买）：</label>
								<div class="col-sm-8">
									<input id="hasScore" name="hasScore" th:value="${salesCoupon.hasScore}" class="form-control" type="text">
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">所需余额：</label>
								<div class="col-sm-8">
									<input id="score" name="score" th:value="${salesCoupon.score}" class="form-control" type="text">
								</div>
							</div>-->
							
							<div class="form-group">
								<label class="col-sm-3 control-label">发送方式：</label>
								<div class="col-sm-8">
									<label class="radio-inline"> <input
											th:field="*{salesCoupon.hasScore}" type="radio" name="hasScore" value="0" />
										新人
									</label> <label class="radio-inline"> <input
										th:field="*{salesCoupon.hasScore}" type="radio" name="hasScore" value="1" />
									免费发放
								</label>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">状态：</label>
								<div class="col-sm-8">
									<label class="radio-inline"> <input
											th:field="*{salesCoupon.status}" type="radio" name="status" value="0" />
										启用
									</label> <label class="radio-inline"> <input
										th:field="*{salesCoupon.status}" type="radio" name="status" value="1" />
									禁用
								</label>
								</div>
							</div>
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<!--<script type="text/javascript" src="/css/plugins/laydate/laydate.js"></script>
	<script src="/js/bootstrap.min.js?v=3.3.6"></script>
	<script src="/js/layui.js"></script>-->
	<script type="text/javascript" src="/js/appjs/wx/salesCoupon/edit.js">
	</script>
</body>
</html>
